package com.whfp.coky.ui

import android.content.Intent
import com.whfp.coky.databinding.ActivitySplashBinding
import com.whfp.coky.ui.base.BaseActivity
import com.whfp.coky.ui.base.BaseViewModel
import com.whfp.coky.ui.entry.ActivationAct


class SplashActivity : BaseActivity<BaseViewModel<ActivitySplashBinding>, ActivitySplashBinding>() {

    override fun initView() {
        if (!this.isTaskRoot) {
            val mainIntent = intent
            val action = mainIntent.action
            if (mainIntent.hasCategory(Intent.CATEGORY_LAUNCHER) && action == Intent.ACTION_MAIN) {
                finish()
                return
            }
        }
    }

    override fun initData() {
        postDelayed({
            startActivity(ActivationAct::class.java)
            finish()
        },1500)
    }


}


